package com.df.springmvc.bi.rcjg.controller;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.df.springmvc.bi.rcjg.services.rcjgServices;
import com.df.springmvc.common.bean.MsgBean;
import com.df.springmvc.common.util.WebUtil;
import com.df.springmvc.supper.SupperController;
import com.df.springmvc.system.auth.services.AuthServices;



@Controller
@RequestMapping("/bi/rcjg")
/**
 * 信息资源平台页面控制
 * @author David
 *
 */
public class rcjgController extends SupperController{
	String page_staff="bi/rcjg/";
	@Autowired
	rcjgServices services;
	
	public rcjgController(){
		// TODO Auto-generated constructor stub
		//
	}
	//
	@RequestMapping(value={"/"})
	public String excute(ModelMap model,HttpServletRequest request,HttpServletResponse response){
		org.apache.log4j.Logger.getLogger(getClass()).info("bipage");
		return page_staff;
	}
	// 主题首页
	@RequestMapping(value={"/torcjg" })
	public String toView(ModelMap model,HttpServletRequest request,HttpServletResponse response){
		try{
			
		}catch(Exception e){
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return page_staff + "rcjg";
	}
	       //生产报表页面
			@RequestMapping(value={"/torcjgsc" })
			public String toxzspsc(ModelMap model,HttpServletRequest request,HttpServletResponse response){
				try{
					
				}catch(Exception e){
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				return page_staff + "rcjg-sc";
			}
			//经营报表页面
			@RequestMapping(value={"/torcjgjy" })
			public String toxzspjy(ModelMap model,HttpServletRequest request,HttpServletResponse response){
				try{
					
				}catch(Exception e){
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				return page_staff + "rcjg-jy";
			}
			/**
			 * 获取生产报表信息
			 * @return
			 * @throws Exception
			 */
			@RequestMapping("/getscinfo")
			public void getscinfo(ModelMap model,HttpServletRequest request,HttpServletResponse response){
				try{
					Object o=services.getGetsc(getParamMap(request,"map"));
					WebUtil.json(response,new MsgBean(o));
					// WebUtil.json(response,new MsgBean(gridBean));
				}catch(Exception e){
					// TODO Auto-generated catch block
					e.printStackTrace();
					WebUtil.json(response,new MsgBean(e.getMessage(),false));
				}
			}
			/**
			 * 获取经营覆盖率报表信息
			 * @return
			 * @throws Exception
			 */
			@RequestMapping("/getjyinfo")
			public void getjyinfo(ModelMap model,HttpServletRequest request,HttpServletResponse response){
				try{
					Object o=services.getGetjy();
					WebUtil.json(response,new MsgBean(o));
					// WebUtil.json(response,new MsgBean(gridBean));
				}catch(Exception e){
					// TODO Auto-generated catch block
					e.printStackTrace();
					WebUtil.json(response,new MsgBean(e.getMessage(),false));
				}
			}
			/**
			 * 获取经营报表信息
			 * @return
			 * @throws Exception
			 */
			@RequestMapping("/getjysinfo")
			public void getjysinfo(ModelMap model,HttpServletRequest request,HttpServletResponse response){
				try{
					Object o=services.getGetjy1(getParamMap(request,"map"));
					WebUtil.json(response,new MsgBean(o));
					// WebUtil.json(response,new MsgBean(gridBean));
				}catch(Exception e){
					// TODO Auto-generated catch block
					e.printStackTrace();
					WebUtil.json(response,new MsgBean(e.getMessage(),false));
				}
			}
}

